"use client"; import styles from "./info.module.css"; import Link from "next/link"; import { storeLocal } from "../../history/storeData"; export default function Buttons({ content: data }) { function store_to_local(title, chapter, volume, image, id, id2) { let data = { title: title, chapter: chapter, volume: volume, image: image, id: id, mangaId: id2, }; storeLocal(data); } return (
{data.chapters && data.chapters.map((item, index) => { if (item.pages !== 0) { return ( { store_to_local( data.title.english || data.title.romaji, parseInt(item.chapterNumber), parseInt(item.volumeNumber), data.image, item.id, data.id ); }} > ); } })}
); }